#pragma once
namespace fly {

	namespace jld{

		namespace buffer {	

			class base_buf
			{
			protected:
				asio::streambuf buf_;
				const size_t header_size_;
				//proto msgBody really size included at least two bytes.
				const size_t min_buf_size_;
			public:
				base_buf();
				virtual ~base_buf();
				virtual asio::streambuf& buf();
				//get header size
				const size_t& header_size();
				void commit();
				void consume();
			};


		}
	}
}